package design.singleDesign;
//饿汉单例模式
public class HungrySingleDestory {
    //首先构造方法私有化
    private HungrySingleDestory (){};
    //其次声明属性
    public volatile static HungrySingleDestory singleDestory=new HungrySingleDestory();
    //具体实例化方法
    public HungrySingleDestory newInstance(){
         return singleDestory;
    }
}
